﻿#region Usings

using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Rail.Net.Common.Resources;

#endregion

namespace Rail.Net.Core.Model.Nonpersistent
{
    [Serializable]
    [DataContract]
    public class ClientDataModel
    {
        [DataMember]
        public SearchModel SearchModel { get; set; }

        [DataMember]
        public int OutwardProductId { get; set; }

        [DataMember]
        public Product2Model OutwardProduct { get; set; }

        [DataMember]
        public int ReturnProductId { get; set; }

        [DataMember]
        public Product2Model ReturnProduct { get; set; }

        [Required(ErrorMessageResourceType = typeof(Global), ErrorMessageResourceName = "ClientDataModel_FirstNameRequired")]
        [Display(ResourceType = typeof(Global), Name = "ClientDataModel_FirstName")]
        public string FirstName { get; set; }

        [Required(ErrorMessageResourceType = typeof(Global), ErrorMessageResourceName = "ClientDataModel_LastNameRequired")]
        [Display(ResourceType = typeof(Global), Name = "ClientDataModel_LastName")]
        public string LastName { get; set; }

        [Required(ErrorMessageResourceType = typeof(Global), ErrorMessageResourceName = "ClientDataModel_EmailRequired")]
        [Display(ResourceType = typeof(Global), Name = "ClientDataModel_Email")]
        public string Email { get; set; }

        [Required(ErrorMessageResourceType = typeof(Global), ErrorMessageResourceName = "ClientDataModel_AcceptTermsRequired")]
        [Display(ResourceType = typeof(Global), Name = "ClientDataModel_AcceptTerms")]
        public bool AcceptTerms { get; set; }
    }
}